package com.daxt.utils;

import org.springframework.util.StringUtils;

public class FileGenUtil {
	
	public static String numGen(String num,int count) {
		try {
		Integer.parseInt(num);
		}catch (Exception e) {
			num="";
		}
		if (!StringUtils.isEmpty(num)) {
			int parseInt = Integer.parseInt(num);
			num = (parseInt+1) + "";
			for (int i = 0; i < count - (parseInt+"").length(); i++) {
				if(num.length()<count)
				num = "0" + num;
			}
		}else {
			num="1";
			for (int i = 0; i < count - num.length(); i++) {
				num = "0" + num;
			}
		}
		return num;
	}
	public static void main(String[] args) {
		System.out.println(FileGenUtil.numGen("009",3));
	}
}
